package com.sc.nft.controller;




import com.sc.nft.annotation.UserLogin;
import com.sc.nft.controller.request.IdStrRequest;
import com.sc.nft.entity.ParticularsIdentityRights;
import com.sc.nft.entity.dto.ParticularsIdentityRightsTypeDTO;
import com.sc.nft.entity.vo.ParticularsIdentityRightsVO;
import com.sc.nft.entity.vo.SecretAreaPageVO;
import com.sc.nft.pool.UserPool;
import com.sc.nft.service.ParticularsIdentityRightsService;
import com.sc.nft.sup.PageRequest;
import com.sc.nft.sup.PageResult;
import com.sc.nft.sup.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * (ParticularsIdentityRights)表控制层
 *
 * @author 王伟成
 * @since 2024-03-09 15:04:12
 */

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("particularsIdentityRights")
@Api(tags = "身份权益详情")
public class ParticularsIdentityRightsController {
    /**
     * 服务对象
     */
    private final ParticularsIdentityRightsService particularsIdentityRightsService;


    @ApiOperation(value = "根据type获取权益图", notes = "根据type获取权益图", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/getType", produces = MediaType.APPLICATION_JSON_VALUE)
    @UserLogin
    public Result<ParticularsIdentityRightsVO> getType(@Valid @RequestBody ParticularsIdentityRightsTypeDTO request) {
        return Result.success(particularsIdentityRightsService.getType(request.getType()));
    }
   
}
